import java.util.Scanner;
import java.text.SimpleDateFormat;
import java.sql.Date;
// 1:无需package
// 2: 类名必须Main, 不可修改

public class lq1452 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        long a = scan.nextLong();
        Date data = new Date(a);
        SimpleDateFormat sdf = new SimpleDateFormat ("HH:mm:ss");
        System.out.println(sdf.format(data));
        scan.close();
    }
}
